
    const http = require('http')
    const fs = require('fs')
    const config = require('./config')
    http.createServer((req, resp) => {
        if(req.url !== '/favicon.ico') {
            const url = config[req.url] ? req.url : '404'
            fs.readFile(config[url], (err, data) => {
                if(err) {
                    resp.end('读取失败')
                } else {
                    resp.end(data)
                }
            })
        }
    }).listen(1908)
